function f(){
    var a =Number(prompt("请输入第一个数"));
    var b =Number(prompt("请输入第二个数"));
    if (!Number.isInteger(a)||!Number.isInteger(b)){
        document.getElementsByClassName("text")[0].innerHTML="你媽的，為什麼";
    }
    else if(confirm("让两个数相加？")){
        var c =a+b;
        document.getElementsByClassName("text")[0].innerHTML=a+"+"+b+"="+c;
    }else if (confirm("让两个数相减？")){
        var c =a-b;
        document.getElementsByClassName("text")[0].innerHTML=a+"-"+b+"="+c;
    }else if (confirm("让两个数相乘？")){
        var c =a*b;
        document.getElementsByClassName("text")[0].innerHTML=a+"*"+b+"="+c;
    }else if (confirm("让两个数相除？")){
        var c =a/b;
        document.getElementsByClassName("text")[0].innerHTML=a+"/"+b+"="+c;
    }else {
        document.getElementsByClassName("text")[0].innerHTML="你媽的，為什麼";
    }
}
function startTime(){
    var date=new Date();
    document.getElementsByClassName("text")[1].innerHTML=date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDay()+"日<br>"+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
    window.setTimeout(function(){startTime()},500);
}